home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-15 | 1.2 KB | 61 lines | [TEXT/MPS ] |
- (*
- TCPClose connectionID -- Close the TCP connection.
-
- To compile and link this file using Macintosh Programmer's Workshop,
-
- pascal -w TCPClose.p
- link -m ENTRYPOINT -o HyperCommands -rt XCMD=7860 -sn Main=TCPClose ∂
- TCPClose.p.o "{Libraries}HyperXLib.o" "{MPW}"Libraries:interface.o
-
- © Copyright 1988 by Apple Computer, Inc.
-
- Initial coding 12/88 by Harry R. Chesley.
- *)
-
- {$R-}
-
- {$S TCPClose } { Segment name must be the same as the command name. }
-
- unit DummyUnit;
-
- interface
-
- uses MemTypes, QuickDraw, OSIntf, HyperXCmd;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- implementation
-
- procedure TCPClose(paramPtr: XCmdPtr); forward;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- begin
- TCPClose(paramPtr);
- end;
-
- procedure TCPClose(paramPtr: XCmdPtr);
-
- var i: integer;
-
- procedure Fail(errMsg: Str255); { set theResult and quit }
- begin
- paramPtr^.returnValue := PasToZero(paramPtr,errMsg);
- exit(TCPClose);
- end;
-
- {$I TCPUtil.inc}
-
- begin
- if paramPtr^.paramCount <> 1 then Fail('§§§ parameter count is not 1 §§§');
-
- SetUpConnectionID;
-
- { Issue the close command. }
- ZeroIOParms;
- SyncControlBlock.csCode := TCPcsClose;
- if PBControl(@SyncControlBlock,false) <> noErr then Fail('§§§ close call failed §§§');
- end;
-
- end.
-